﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Controls/MasterPage.master" AutoEventWireup="true"
    CodeFile="Search.aspx.cs" Inherits="Pages_Search" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="cot_trai">
        <div class="box1">
            <div class="title1">
                <asp:HyperLink ID="hlCate" runat="server">Tin tức</asp:HyperLink></div>
            <div class="clear">
            </div>
            <div class="dong2">
                <div id="cse" style="width: 100%;">Loading</div>
                <script src="http://www.google.com.vn/jsapi" type="text/javascript"></script>
                <script type="text/javascript">
                    function parseQueryFromUrl() {
                        var queryParamName = "q";
                        var search = window.location.search.substr(1);
                        var parts = search.split('&');
                        for (var i = 0; i < parts.length; i++) {
                            var keyvaluepair = parts[i].split('=');
                            if (decodeURIComponent(keyvaluepair[0]) == queryParamName) {
                                return decodeURIComponent(keyvaluepair[1].replace(/\+/g, ' '));
                            }
                        }
                        return '';
                    }
                    google.load('search', '1', { language: 'vi' });
                    google.setOnLoadCallback(function () {
                        var customSearchControl = new google.search.CustomSearchControl('012432916009251399586:y2ozunltlms');
                        customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
                        customSearchControl.draw('cse');
                        var queryFromUrl = parseQueryFromUrl();
                        if (queryFromUrl) {
                            customSearchControl.execute(queryFromUrl);
                        }
                    }, true);
                </script>
                <link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" /> 

            </div>
            <!--box1_c2-->
            
            <div class="clear">
            </div>
        </div>
        <!--box1-->
    </div>
</asp:Content>
